package com.eedi.framework.permission.controller.org.vo.permission;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Schema(description = "经营界面 - 批量赋予用户角色 Request VO")
@ExcelIgnoreUnannotated
@ToString
public class OrgPermissionAssignUserRoleRowReq implements Serializable {

    /**
     * excel行号
     */
    private int rowNo;

    @NotNull(message = "用户姓名不能为空")
    @Length(min = 2, max = 20)
    @ExcelProperty(value = "用户姓名", index = 0)
    private String userName;
    /**
     * 用户登录名
     */
    @NotNull(message = "用户账号不能为空")
    @Length(min = 4, max = 20)
    @ExcelProperty(value = "用户账号", index = 1)
    private String orgUserLoginId;

    /**
     * 角色名称
     */
    @NotNull(message = "角色名称不能为空")
    @Length(min = 4, max = 20)
    @ExcelProperty(value = "角色名称", index = 2)
    private String orgUserRoleName;

    private String orgUserId;

    public String getOrgUserId(){
        return this.orgUserId;
    }

    public void setOrgUserId(String orgUserId){
        this.orgUserId = orgUserId;
    }


    public int getRowNo() {
        return this.rowNo;
    }

    public @NotNull(message = "用户姓名不能为空") @Length(min = 2, max = 20) String getUserName() {
        return this.userName;
    }

    public @NotNull(message = "用户账号不能为空") @Length(min = 4, max = 20) String getOrgUserLoginId() {
        return this.orgUserLoginId;
    }

    public @NotNull(message = "角色名称不能为空") @Length(min = 4, max = 20) String getOrgUserRoleName() {
        return this.orgUserRoleName;
    }

    public void setRowNo(int rowNo) {
        this.rowNo = rowNo;
    }

    public void setUserName(@NotNull(message = "用户姓名不能为空") @Length(min = 2, max = 20) String userName) {
        this.userName = userName;
    }

    public void setOrgUserLoginId(@NotNull(message = "用户账号不能为空") @Length(min = 4, max = 20) String orgUserLoginId) {
        this.orgUserLoginId = orgUserLoginId;
    }

    public void setOrgUserRoleName(@NotNull(message = "角色名称不能为空") @Length(min = 4, max = 20) String orgUserRoleName) {
        this.orgUserRoleName = orgUserRoleName;
    }
}
